using System;
using System.Collections.Generic;
using System.Text;

using System.IO;
namespace JamD3
{
    class ConcertText
    {
        String _TextFilePath;
        public String TextFilePath
        {
            get { return _TextFilePath; }
            set { _TextFilePath = value; }
        }

        String _AlbumTitle;
        public String AlbumTitle
        {
            get { return _AlbumTitle; }
            set { _AlbumTitle = value; }
        }

        String _AlbumArtist;
        public String AlbumArtist
        {
            get { return _AlbumArtist; }
            set { _AlbumArtist = value; }
        }

        String _AlbumYear;
        public String AlbumYear
        {
            get { return _AlbumYear; }
            set { _AlbumYear = value; }
        }

        String _FileContents;
        public String FileContents
        {
            get { return _FileContents; }
            set { _FileContents = value; }
        }

        private StreamReader _fileStreamIn;
        private StreamReader fileStreamIn
        {
            get { return (_fileStreamIn = _fileStreamIn ?? new StreamReader(TextFilePath)); }
        }


        public bool LoadConcertTextFile(String FilePath)
        {
            TextFilePath = FilePath;
            FileContents = fileStreamIn.ReadToEnd();
            return true;
        }
        public ConcertText()
        {
            AlbumArtist = AlbumTitle = AlbumYear = TextFilePath = "";
        }
        ~ConcertText()
        {
            if (fileStreamIn != null)
            { fileStreamIn.Close(); }
        }
    }
}
